#pragma once

#include "type.h"
#include "matrix4.h"

#include "Camera.h"

//class hkpRigidBody;
namespace ChunkSystem
{
	class ChunkSpace;
	class Chunk;

	class ChunkCamera
		: public RenderSystem::Camera
	{
	public:
		ChunkCamera(void);
		~ChunkCamera(void);

		void SetCurChunkSpace( ChunkSpace* pCurChunkSpace ){ m_pCurChunkSpace = pCurChunkSpace;}
		ChunkSpace* GetCurChunkSpace( void ) const { return m_pCurChunkSpace; }

		Chunk* GetCurChunk( void ) const{ return m_pCurChunk; }
		void SetCurChunk( Chunk* pOccupyChunk ){ m_pCurChunk = pOccupyChunk; }

		float GetHoldingRange(void) const{ return m_fHoldingRange; }
		float GetLoadingRange(void) const{ return m_fLoadingRange; }

		float SetHoldingRange(float fNewHoldingRange) { m_fHoldingRange = fNewHoldingRange;}
		float SetLoadingRange(float fNewLoadingRange) { m_fLoadingRange = fNewLoadingRange;}

	protected:

		ChunkSpace*			m_pCurChunkSpace;
		Chunk*				m_pCurChunk;

		float				m_fHoldingRange;
		float				m_fLoadingRange;
		
		//camera supports physics collision
		//hkpRigidBody*		m_pCameraRigid;

	};

	class ChunkCameraFactory
	{
	public:
		virtual ChunkCamera* CreateCamera(void) = 0;
	};
}